package com.flower8.service;

import com.flower8.model.Banner;
import com.flower8.utils.PageData;

import java.util.List;

/**
 * @Description:
 * @Author: tanglin
 * @Date: 2019/10/23 11:25
 * @Version: 1.0
 */
public interface BannerService {
    /**
     * 查询banner列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<Banner> getBannerList(PageData pd) throws Exception;

    /**
     * 查询banner列表数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getBannerListCount(PageData pd) throws Exception;

    /**
     * 根据banner卡id查询
     * @param pd
     * @return
     */
    Banner getBannerById(PageData pd)throws Exception;

    /**
     * 更新banner
     * @param banner
     * @throws Exception
     */
    void updateBanner(Banner banner)throws  Exception;

    /**
     * 删除banner
     * @param id
     * @throws Exception
     */
    void deleteBanner(long id) throws  Exception;

    /**
     * 新增banner
     * @param banner
     * @throws Exception
     */
    void addBanner(Banner banner)throws  Exception;
}
